package client;

import javax.xml.namespace.QName;
import javax.xml.ws.Service;
import javax.xml.ws.soap.SOAPBinding;

public final class Client 
{
	// TODO odwrotnie http'eki
    private static final QName SERVICE_NAME = new QName("http://interfaces.server/", "Student");
    private static final QName PORT_NAME = new QName("http://interfaces.server/", "StudentPort");

    private Client() {} 

    public static void main(String args[]) throws Exception 
    {
        Service service = Service.create(SERVICE_NAME);
        // Endpoint Address
        String endpointAddress = "http://localhost:9000/timetable/student";
        // If web service deployed on Tomcat deployment, endpoint should be changed to:
        // http://localhost:8080/java_first_jaxws-<cxf-version>/services/hello_world

        // Add a port to the Service
        service.addPort(PORT_NAME, SOAPBinding.SOAP11HTTP_BINDING, endpointAddress);
        
        //Student hw = service.getPort(Student.class);

        
      // System.out.println( hw.getStudentGroups("1") );

    }
}
